<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
   <style>
    .login{
            width: 200px;
            height: 200px;
            background-color: bisque;
            position: absolute;
        }
        .close{
            position: relative;
            top:0px;
            right:0px;
        }
   </style>
</head>
<body>
    <div id="app">
        <button @click="show=!show">登录</button>
        <div class="login" v-if="show">
        <button @click="show=!show" class="close">×</button>
        </div>
    </div>
</body>
<script src="./vue.js"></script>
<script>
    let{createApp,ref}=Vue;
    createApp({

        setup(){
            let show=ref(false)
            return{
                show
            }
        }
    }).mount("#app")
</script>
</html>